<?php

class Adept_Db_MySql_ColumnInfo extends Adept_Db_ColumnInfo
{
    
    protected $name;
    protected $size;
    protected $type;
    protected $primaryKey = false;
    protected $notNull = false;
    
    public function __construct()
    {
    }
    
    public function getName() 
    {
        return $this->name;
    }
    
    public function setName($name) 
    {
        $this->name = $name;
    }
    
    public function getSize() 
    {
        return $this->size;
    }
    
    public function setSize($size) 
    {
        $this->size = $size;
    }
    
    public function getType() 
    {
        return $this->type;
    }
    
    public function setType($type) 
    {
        $this->type = $type;
    }
    
    public function isPrimaryKey() 
    {
        return $this->primaryKey;
    }
    
    public function setPrimaryKey($primaryKey) 
    {
        $this->primaryKey = $primaryKey;
    }
    
    public function isNotNull() 
    {
        return $this->notNull;
    }
    
    public function setNotNull($notNull) 
    {
        $this->notNull = $notNull;
    }    
    
    public function getMetaType()
    {
        if (!$result = $this->retriveMetaType($this->type)) {
            throw new Adept_Db_Exception('Invalid column type');
        }
        return $result;
    }
    
}

